package com.redtea.studyspringboot.core.mapper;

import com.baomidou.mybatisplus.core.config.GlobalConfig;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: StudySpringBoot
 * @ClassName MyBatisConfig
 * @author: LGP
 * @create: 2024-04-18 17:53
 * @description:
 **/

@Configuration
public class MyBatisPlusConfig {
    @Bean
    public GlobalConfig globalConfig() {
        GlobalConfig globalConfig = new GlobalConfig();
        // 开启软删除
        globalConfig.setSqlInjector(new DefaultSqlInjector());
        return globalConfig;
    }
}
